<?php

namespace App\Http\Controllers\Api\v1;

use App\common;
use App\Http\Controllers\Controller;
use App\Logic\SunHouseLogic;


class SunHouseController extends Controller
{
    /*
     *  name wl
     *  宏烨找房首页
     */
    public function sunHouse()
    {
        try {
            return $HouseLogicFunction = SunHouseLogic::sunShow();
        } catch (\Exception $exception) {
            return common::fail($exception->getMessage());
        }
    }

    /**
     *   排行榜渲染
     */
    public function sunRanKing()
    {
        try {
            $renDate = SunHouseLogic::nameAndRent();
            if ($renDate) return common::success(20000, ' $renDate', 'OK');
            return common::fail(50000, 'NULL', 'NO');
        } catch (\Exception $exception) {
            return common::fail($exception->getMessage());
        }
    }

}
